﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="entity">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="record">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="attrib">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute name="crm_name" type="xs:string" use="required" />
                      <xs:attribute name="crm_type" type="xs:string" use="required" />
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="lookup">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="attrib">
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:extension base="xs:string">
                            <xs:attribute name="crm_name" type="xs:string" use="required" />
                            <xs:attribute name="crm_type" type="xs:string" use="required" />
                            <xs:attribute name="force_update" type="xs:boolean" use="required" />
                          </xs:extension>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="entity_name" type="xs:string" use="required" />
                  <xs:attribute name="search" type="xs:string" use="required" />
                  <xs:attribute name="action" type="xs:string" use="required" />
                  <xs:attribute name="crm_name" type="xs:string" use="required" />
                  <xs:attribute name="search_key" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="crm_id" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="source" type="xs:string" use="required" />
      <xs:attribute name="crm_entity" type="xs:string" use="required" />
      <xs:attribute name="source_object" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>